<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ include file="international.jsp" %> 
<jsp:useBean id="userService" class="com.brother.service.UserService"></jsp:useBean>

<jsp:useBean id="postUser" class="com.brother.model.Customer"></jsp:useBean>
<jsp:setProperty property="*" name="postUser"/>
<%
com.brother.model.Customer user = (com.brother.model.Customer)session.getAttribute(com.brother.Constants.LOGIN_SESSTION_NAME);
if(user == null || user.getUserid() == 0 || !user.isAdmin())
	return;
String userid = request.getParameter("userid") == null ?"":request.getParameter("userid").trim();
String action = request.getParameter("action");


if(userid!= null && !userid.isEmpty() && userid.trim().matches("^\\d+$")){
	postUser = userService.GetUserByUserId(Integer.parseInt(userid));
}


%>





		

	<table align="left"  class="tableBorder1" cellpadding="1" border="0" cellspacing="0" width="100%">
  

<tr>
  <th align="left" width="200" style="border-right: 0px !important;"><fmt:message key="user.id"/>: </th>
 <td align="left" nowrap="nowrap" style="border-left: 0px;"><%=postUser.getName()==null?(""):postUser.getName()%>
     </td>
  </tr>
<tr>
  <th align="right" style="border-right: 0px !important;"><fmt:message key="user.username"/>: </th>
 <td align="left"><%=postUser.getRealName()==null?"":postUser.getRealName()%></td>
 </tr>

<%if(user.isAdmin()){ %> 
<tr>
 <th align="right" style="border-right: 0px !important;"><fmt:message key="user.set.admin"/>: </th>
 <td align="left"><%if(postUser.isAdmin()){ %> <fmt:message key="button.yes.text"/><%} %></td>
 </tr> 
 <%} %>
  
<tr>
  <th align="right" style="border-right: 0px !important;"><fmt:message key="user.gender"/>:</th>
 <td align="left"><%if("Male".equals(postUser.getGender())){%>
 <fmt:message key="user.gender.female"/>
 <%}else{ %>
 <fmt:message key="user.gender.male"/>
 <%} %>
     </td>
  </tr>
<tr>
  <th align="right" style="border-right: 0px !important;"><fmt:message key="user.company.name"/>: </th>
 <td align="left"><%=postUser.getCompanyName()==null?"":postUser.getCompanyName()%></td>
  </tr>
<tr>
  <th align="right" style="border-right: 0px !important;"><fmt:message key="user.email"/>:</th>
 <td align="left"><%=postUser.getEmail()==null?"":postUser.getEmail()%></td>
  </tr>
<tr>
  <th align="right" style="border-right: 0px !important;"><fmt:message key="user.address"/>:</th>
 <td align="left"><%=postUser.getAddress()==null?"":postUser.getAddress()%></td>
  </tr>
<tr>
  <th align="right" style="border-right: 0px !important;"><fmt:message key="user.country"/>:</th>
 <td align="left"><%=postUser.getCountry()==null?"":postUser.getCountry()%></td>
  </tr>
<tr>
  <th align="right" style="border-right: 0px !important;"><fmt:message key="user.mobile"/>:</th>
 <td align="left"><%=postUser.getMobile()==null?"":postUser.getMobile()%></td>
  </tr>
<tr>
  <th align="right" style="border-right: 0px !important;"><fmt:message key="user.fax"/>:</th>
 <td align="left"><%=postUser.getFax()==null?"":postUser.getFax()%></td>
  </tr>
<tr>
  <th align="right" style="border-right: 0px !important;"><fmt:message key="user.phone.number"/>: </th>
 <td align="left"><%=postUser.getPhoneNumber()==null?"":postUser.getPhoneNumber()%></td>
  </tr>
<tr>
  <th align="right" style="border-right: 0px !important;"><fmt:message key="user.description"/>:</th>
 <td align="left"><%=postUser.getDescription()==null?"":postUser.getDescription()%></td>
	  </tr>
	
</table>
			
		



<%
com.brother.database.DataBase.closeThreadConnection();
%>